import cv2
import numpy as np

cap = cv2.VideoCapture(0)
while(1):
    # get a frame
    ret, frame = cap.read()
    # show a frame
    cv2.imshow("capture", frame)
    img = cv2.GaussianBlur(frame, (3, 3), 0)
    canny = cv2.Canny(img, 100, 70)

    cv2.imshow("canny", canny)
    if cv2.waitKey(1) & 0xFF == ord('q'):
        break
cap.release()
cv2.destroyAllWindows()